#!/usr/bin/env python
# -*- coding: UTF-8 -*-

import os
import traceback
import multiprocessing
import logging
from restprogress import restProgress
from clientProgress import clientProgress
from mqttProgress import mqttProgress
logger = logging.getLogger(__name__)

if __name__ == "__main__":
    logger.info("System starting ...")
    multiprocessing.freeze_support()
    try:
        restProgress = restProgress()
        # restProgress.setDaemon(True)
        restProgress.start()

        # clientProgress = clientProgress()
        # clientProgress.start()


        mqttProgress = mqttProgress()
        mqttProgress.start()

  
    except:
        es = traceback.format_exc()
        logger.error(es)
        os._exit(-1)
